package com.lxh.student.mapper;

import com.lxh.student.entity.Teacher;
import org.apache.ibatis.annotations.*;

@Mapper
public interface TeacherMapper {
    @Select("select * from teacher where username=#{name} and password=#{password}")
    @Results({
            @Result(column = "username",property = "name"),
    })
    Teacher findOne(Teacher teacher);

    @Select("select * from teacher where username=#{name}")
    @Results({
            @Result(column = "username",property = "name"),
    })
    Teacher findOneByName(String name);
}
